﻿#include "FTextEdit.h"
#include "../Base/FTheme.h"

FTextEdit::FTextEdit(QWidget *parent)
    : QTextBrowser{parent}
{
    setStyleSheet(fstylesheet());
    setReadOnly(false);
    setContextMenuPolicy(Qt::CustomContextMenu);
}

QString FTextEdit::fstylesheet()
{
    return QString(R"(
FTextEdit {
    background: %2;
    border: 1px solid %1;
    border-radius: 2px;
}
)").arg(FColors::getBaseColor(FColors::Default).name(QColor::HexArgb),
        FColors::getBackgroundColor().name(QColor::HexArgb));
}
